<?php $this->load->view('config/header');?>
<h1>Menu <small>form entry</small></h1>
<ol class="breadcrumb">
  <li><a href="<?php echo site_url()?>home"><i class="icon-dashboard"></i> Dashboard</a></li>
  <li><a href="<?php echo site_url()?>setmenu"><i class="icon-edit"></i> Menu</a></li>
  <li class="active"><i class="icon-file-alt"></i> Form <?php echo $mode; ?></li>
</ol>

<form class="form-horizontal" role="form" method="post" action="<?php echo site_url() ?>setmenu/<?php echo $action; ?>">
	<input type="hidden" class="form-control" name="id_menu" value="<?php echo @$detail[0]['id_menu']?>">
	<div class="form-group">
		<label for="nama_menu" class="col-lg-2 control-label">Name Menu</label>
		<div class="col-lg-6">
			<input type="text" class="form-control" name="nama_menu" value="<?php echo @$detail[0]['nama_menu']?>" >
		</div>
	</div>
	<div class="form-group">
		<label for="urutan_menu" class="col-lg-2 control-label">Urutan Menu</label>
		<div class="col-lg-1">
			<input type="text" class="form-control" name="urutan_menu" value="<?php echo @$detail[0]['urutan_menu']?>" >
		</div>
	</div>
	<div class="form-group">
		<label for="enable_menu" class="col-lg-2 control-label">Enable</label>
		<div class="col-lg-2">
			<?php $selected1 =  ''; ?>
			<?php $selected2 =  ''; ?>
			<select class="form-control" name="enable_menu">
				<?php if (@$detail[0]['enable_menu'] == 1):?>
					<?php $selected1 =  'selected="selected"' ?>
				<?php elseif (@$detail[0]['enable_menu'] == 0):?>
					<?php $selected2 =  'selected="selected"' ?>
				<?php else :?>
					<?php $selected1 =  ''; ?>
					<?php $selected2 =  ''; ?>
				<?php endif;?>
				<option value="1" <?php echo $selected1; ?> >Aktif</option>
				<option value="0" <?php echo $selected2; ?> >Non Aktif</option>
			</select>
		</div>
	</div>
	<div class="form-group">
		<div class="col-lg-offset-2 col-lg-10">
			<input type="submit" name="submit" value="Simpan" class="btn btn-primary"/>
			<a href="<?php echo site_url()?>setmenu" class="btn btn-primary">Batal</a>
		</div>
	</div>
</form>

<?php $this->load->view('config/footer');?>